import QtQuick 2.15
import QtQuick.Controls 2.15
Button {
    id:root
    property var myId: "no"
    property var cmdStr: ""
    enabled: true
    signal sendCmd(cmdStr:string)
    focus: true
    MouseArea {
        id: mouseRoot
        anchors.fill: parent
        acceptedButtons: Qt.LeftButton | Qt.RightButton
        onPressed: (mouse) =>{
                       console.log("点击" + cmdStr)
                       root.sendCmd(root.cmdStr)
                   }
    }
}
